package com.peanut.constants;


public enum Status {
	// 成功部分
	SUCCESS(1000,"成功"),              // 普通的成功
	LOGIN_SUCCESS(1001,"登录成功"),
	LOGOUT_SUCCESS(1002,"退出成功"),
	UPLOAD_SUCCESS(1003,"上传成功"),
	
	
	// 失败部分
	FAILED(2000,"操作失败"),           // 普通的失败
	NOT_LOGIN(2001,"用户未登录"),            // 客户端应自行跳转到登录页
	ACCOUNT_DISABLED(2002,"账号禁用"),       // 客户端应自行跳转到登录页
	ACCOUNT_NOT_FOUND(2003,"账号不存在"),
	NOT_PERMISSION(2004,"无权限操作/权限不足"),
	ACCOUNT_NOT_RIGHT(2005,"账号或密码不正确"),
	CHECK_CODE_ERROR(2006,"验证码不正确"),
	UPLOAD_FILE_LIMIT(2007,"没有文件或者上传过多"),
	CANNOT_DELETE_INNER_ADMIN(2008,"系统限制：无法删除内置管理员"),
	CANNOT_DELETE_ME(2009,"系统限制：无法删除自身"),
	CANNOT_INVALID_ME(2010,"系统限制：无法无效自身"),
	CANNOT_INVALID_INNER_ADMIN(2011,"系统限制，无法无效内置管理员"),
	NO_ROLE(2012,"账号没有角色，没有任何权限"),
	
	PAGE_NOT_FOUND(2404,"页面不存在"),
	SERVER_ERROR(2500,"服务器内部错误")
	;
	
	
	public int code;
	public String message;
	
	Status(int code, String message) {
		this.code = code;
		this.message = message;
	}
}
